$(function(){
	//关于点击后的连接问题，以及内容
	var arr = common.search();
	if(arr.valchild){
		$('.contll-nav .con-li').eq(0).addClass('hov6').siblings().removeClass('hov6');
		$('.contll-nav .con-li ol').css({'display':'block'})
		$('.contll-nav .con-li ol li').eq(arr.valchild-1).children('a').css({'color':'#be9b65'});
	}else{
//		$('.contll-nav .con-li').eq(2).addClass('hov6').siblings().removeClass('hov6');
//		$('.contll-nav .con-li').eq(2).children('ol').css({'display':'block'});
//		$('.contll-nav .con-li').eq(2).children('ol').children('li').eq(0).addClass('hov7')
	}
	var url = common.url();
	var began = 0;
	var listlen = 10;
	var jk = common.Interface('schoollist')[0]+arr.schxmid;
	common.hash('page',fnhash);
	function fnhash(hash){
		//分页
		if(common.hashlist().page){
			began = (common.hashlist().page-1)*listlen
		}
		var url = jk +'&offset='+ began +'&limit='+ listlen
		$.ajax({
				url : url,
				type: "POST",
				error: function(request) {
					console.log(request)
				},
				dataType:"json",
				success: function(data) {
					if(!data.ret) return;
					var json = data.data;
					var pages =Math.ceil(json.total / listlen);
					common.pagesgn(pages,6);
					$('.xmlist').html('');
					var rows = json.rows;
					if(rows.length>0){
						var html = '';
						for(var i=0;i<rows.length;i++){
							var title = common.maxlen(rows[i].title,20,true);
							var summary = common.maxlen(rows[i].summary,40,true);
							var times = common.timechange(rows[i].pubdate,true);
							html += '<li class="clear"><div class="xmleft"><a href="/detail.htm?id='+ rows[i].id +'" >\
								<img src="'+ rows[i].picture +'" alt="" />\
								<p class="xmlbg"></p><p class="xmrbg"></p></a></div><div class="xmright">\
							<a href="/detail.htm?id='+ rows[i].id +'" class="xm-title">'+ title +'</a><p class="xm-val">\
							'+ summary +'</p><a href="/detail.htm?id='+ rows[i].id +'" class="xm-link">了解详情</a>\
							<div class="timesee clear">\
								<p class="time fl">'+ times +'</p>\
								<p class="see-times fl">'+ rows[i].readCount +'</p></div></div></li>';
						}
						$('.xmlist').html(html);
					}else{
						
					}
				}
			})
	}
})